<script>on returnInFieldsend mouseUp to button "Run Search"end returnInFieldon mouseWithinballoon "Enter your query in this field."end mouseWithin</script>
</part>
<part>
<id>3</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <true /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>6</left>
<top>141</top>
<right>367</right>
<bottom>233</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>results</name>
<script>---------------------------------------------------------on mouseUp-- answer "You need to select an action such as 'View' or 'Save' "&¬--"before applying it to a document headline." with "OK"if the optionKey is down thensend mouseUp to card button "save"elsedisplayEntryend ifpass mouseUpend mouseUp---------------------------------------------------------on displayEntry-- select a result for viewing-- #define CT_document 0-- #define CT_byte 1-- #define CT_line 2-- #define CT_paragraph 3-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- document countglobal docCountif cd fld "results" is empty thenexit displayEntryend ifif the clickLoc is not within rect of cd field "results" thenexit displayEntryend if-- select the lineget the clicklineput it into myLineselect itput ( word 2 of myLine ) - 1 into resultDocNum-- no document headline in this rowif resultDocNum >= docCount thenanswer "Not a valid document"exit displayEntryend if-- get document headline informationput ReadQueryResult(resultDocNum) into waisErrorif waisError ≠ 0 thenanswer "An error occured while reading this document headline."¬with "OK"exit displayEntryend if-- display the textput displayTEXT() into waisErrorif waisError ≠ 0 thenanswer "An error occured while downloading the text."¬with "OK"exit displayEntryend if-- display the thumbnailput displayJFIF_TBNL() into waisErrorif waisError ≠ 0 thenanswer "An error occured while downloading the picture."¬with "OK"exit displayEntryend ifend displayEntry---------------------------------------------------------function displayTEXT-- download the first 100 lines (if possible) of the document and-- go to the document card-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- set up our document chunk parametersput 2 into resultChunkTypeput 0 into resultDocStartput resultDocStart + 99 into resultDocEnd-- check to see if we dont go beyond the end of the document,-- and that there are any lines, sometimes the server does-- not fill in this fieldif docLines < resultDocEnd and docLines > 0 thenput docLines into resultDocEndend if-- download the document chunkset cursor to busyput GetDoc(resultDocNum , "TEXT", resultChunkType, resultDocStart, ¬resultDocEnd) into waisError--put GetDocByID(docDatabaseName, docSiteName, docSiteIP, docSitePort, ¬--docID, docType, resultChunkType, resultDocStart, ¬--resultDocEnd) into waisErrorif waisError ≠ 0 thenanswer "An error occured while downloading the document."¬with "OK"return waisErrorend if-- put it into our document fieldput docHdl into card field "document"-- reajust our document fieldset the scroll of card field "document" to 0return 0end displayTEXT---------------------------------------------------------function displayJFIF-- download the picture display it-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- automatic or notglobal automatic-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- current document number globalglobal resultDocNum-- JFIF datatype - download it, save it and display it-- append a .jfif to the end of the file nameset the itemDelimiter to ":"put word 2 of the long name of this stack into pathNameput the length of pathName - 1 into pathNameLengthput pathNameLength - the length of the short name of this stack into pathNameLengthput character 2 to pathNameLength of pathName into pathNameput pathName & "tmp" into documentNameput documentName& ".jfif" into documentNameJFIFset cursor to busyput GetDocToFile(resultDocNum, "JFIF", documentNameJFIF, "ppxi", "JFIF")¬into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError ≠ 0 thenanswer "An error occured while downloading the picture."¬with "OK"return waisErrorend if-- convert it from a JFIF file to a pict filejfiftopict documentNameJFIF,File,documentName,trueput the result into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError ≠ 0 thenanswer "An error occured while decoding the picture."¬with "OK"put waisError into message boxreturn waisErrorend if-- delete the JFIF fileput HCDelFile(documentNameJFIF) into waisError-- Add display it as a picturepicture documentName,File,zoom,false,0set the itemDelimiter to ":"put the last item of documentName into documentNameset the globalloc of window documentName to deepestset visible of window documentName to truereturn 0end displayJFIF---------------------------------------------------------function displayJFIF_TBNL-- download the thumbnail and display it-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- automatic or notglobal automatic-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- current document number globalglobal resultDocNum-- JFIF-TBNL datatype - download it, save it and display it-- append a .jfif to the end of the file nameset the itemDelimiter to ":"put word 2 of the long name of this stack into pathNameput the length of pathName - 1 into pathNameLengthput pathNameLength - the length of the short name of this stack into pathNameLengthput character 2 to pathNameLength of pathName into pathNameput pathName & "tmp" into documentNameput documentName& ".jfif" into documentNameJFIFset cursor to busyput GetDocToFile(resultDocNum, "JFIF-TBNL", documentNameJFIF, "ppxi", "JFIF")¬into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError ≠ 0 thenanswer "An error occured while downloading the picture."¬with "OK"return waisErrorend if-- convert it from a JFIF file to a pict filejfiftopict documentNameJFIF,File,documentName,trueput the result into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError ≠ 0 thenanswer "An error occured while decoding the picture."¬with "OK"return waisErrorend if-- delete the JFIF fileput HCDelFile(documentNameJFIF) into waisError-- display the thumbnailset the itemDelimiter to ","put the rect of card button "preview" into myLocput the first item of myLoc & "," & the second item of myLoc into myLocAllClipQTPict DiffClip,the rect of card button "preview"QTPict DisplayPict,documentName,myLoc,File, clipTo, ¬the rect of card button "preview"if the result is not empty thenanswer the resultend if-- delete the temporary fileput HCDelFile(documentName) into waisErrorreturn 0end displayJFIF_TBNL---------------------------------------------------------on mouseWithinballoon "This field contains the document headlines returned from a "¬&" search. " & return & "To view or save a document, click the "¬& "'view' or 'save' button, then click on the entry, alternatively "¬& "you may click on the document to view it, or 'option'-click to "¬& "save it."end mouseWithin---------------------------------------------------------</script>
</part>
<part>
<id>6</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>298</left>
<top>55</top>
<right>359</right>
<bottom>69</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<name>Run Search</name>
<script>on mouseUp-- run the query-- first check to see if there are any sources selected-- then request opening the selected sources-- then submit the query-- then retrieve the results-- wais sources folderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- document headline rangeglobal docHeadlineRange-- document count global ( for current query )global docCount-- current document number globalglobal resultDocNum-- source open globalglobal sourceOpen-- open the sourceif sourceOpen ≠ 1 thenput "jfif" into databaseNameput 25 into databaseMaxDocNumput "atg.welch.jhu.edu" into siteNameput "128.220.59.22" into siteIPput "210" into sitePortput OpenWaisSource(databaseName ,databaseMaxDocNum, siteName,¬siteIP,sitePort) into waisError-- if the source could not be opened then give the-- user the chance to bail out otherwise we update the-- openSources globalif waisError ≠ 0 thenanswer "The source " & databaseName & " could not be opened."¬with "OK"exit mouseUpend ifput 1 into sourceOpenend if-- fire off our queryput card field "query" into queryTextput SubmitQuery(queryText) into waisError-- clear out the results fieldput empty into card field "results"put empty into card field "document"put empty into results-- check to see if our search could be completedif waisError ≠ 0 thenanswer "The search could not be correctly completed " with "OK"exit mouseUpend if-- get the number of documents returnedput GetDocCount() into waisErrorif waisError ≠ 0 thenanswer "Could not read the document count" with "OK"exit mouseUpend ifif docCount = 0 thenanswer "No headlines where returned" with "OK"exit mouseUpend if-- range retrieval ( 1 - true, 0 - false )-- if range is 1, we get the headlines is ranges-- otherwise we get them one at a timeput 1 into rangeif range = 0 then-- cycle through all the documents and retrieve the document-- information headline, retain the score and the headlinerepeat with i = 0 to docCount -1set cursor to busyput ReadQueryResult(i) into waisErrorif waisError ≠ 0 thenanswer "Could not read a headline, should I continue?" with "OK" or "Cancel"if it is "Cancel" thenexit mouseUpend ifend ifput results & docScore&" "&docHeadline & return into resultsend repeatelse-- get the headline range - can get up to 50 headline in one goset cursor to busyput ReadQueryResultRange(0,docCount -1) into waisErrorif waisError ≠ 0 thenanswer "Could not read the headlines." with "OK" or "Cancel"if it is "Cancel" thenexit mouseUpend ifend ifput docHeadlineRange into resultsend if-- put the results in our results fieldput results into card field "results"end mouseUpon mouseWithinballoon "Click on this button to search the selected sources."end mouseWithin</script>
</part>
<part>
<id>23</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>12</left>
<top>54</top>
<right>65</right>
<bottom>71</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Palatino</font>
<textSize>12</textSize>
<textStyle>outline</textStyle>
<textStyle>bold</textStyle>
<textHeight>16</textHeight>
<name>query_label</name>
<script></script>
</part>
<part>
<id>25</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>10</left>
<top>122</top>
<right>68</right>
<bottom>139</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Palatino</font>
<textSize>12</textSize>
<textStyle>outline</textStyle>
<textStyle>bold</textStyle>
<textHeight>16</textHeight>
<name>results_label</name>
<script></script>
</part>
<part>
<id>26</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>3</left>
<top>11</top>
<right>237</right>
<bottom>45</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Palatino</font>
<textSize>24</textSize>
<textStyle>extend</textStyle>
<textStyle>outline</textStyle>
<textStyle>bold</textStyle>
<textHeight>32</textHeight>
<name>search_label</name>
<script></script>
</part>
<part>
<id>37</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>310</left>
<top>123</top>
<right>361</right>
<bottom>137</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<name>Download</name>
<script>---------------------------------------------------------on mouseUp-- select a result for saving-- #define CT_document 0-- #define CT_byte 1-- #define CT_line 2-- #define CT_paragraph 3-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- document countglobal docCount-- see if we are displaying a documentif card field "results" is empty or card field "document" is empty thenexit mouseUpend ifput ( word 2 of the clickLine ) - 1 into resultDocNum-- no document headline in this rowif resultDocNum >= docCount thenanswer "Not a valid document"exit mouseUpend if-- get document headline informationput ReadQueryResult(resultDocNum) into waisErrorif waisError ≠ 0 thenanswer "An error occured while reading this document headline."¬with "OK"exit mouseUpend if-- if there is more than one document type put up the list pickerput the number of lines of docType into docTypeNumif docTypeNum > 1 thenput "Text" & return & "Picture" & return & "Thumbnail Picture" ¬into docTypeListput niceFileName(docHeadline) into documentNameget showList(docTypeList,"Choose the kind of document you want to save:" ¬& return & "(" &documentName & ")" ,¬false,false,"Select,Cancel",1)-- if the user cancelled, we exitif line 1 of it = "Cancel" thenexit mouseUpend if-- extract the selected document typeput line 2 of it into docTypeNumput line docTypeNum of docTypeList into docTypeListif docTypeList = "Text" thenput "TEXT" into docTypeelse if docTypeList = "Picture" thenput "JFIF" into docTypeelse if docTypeList = "Thumbnail Picture" thenput "JFIF-TBNL" into docTypeend ifend if-- download the documentif docType = "TEXT" thenput downloadTEXT() into waisErrorexit mouseUpelse if docType = "JFIF" thenput downloadJFIF() into waisErrorexit mouseUpelse if docType = "JFIF-TBNL" thenput downloadJFIF() into waisErrorexit mouseUpend ifend mouseUp---------------------------------------------------------function downloadTEXT-- prompt the user for a file name and download the document to that-- file-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docSitePortglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- ask for the file name to save the document intoput niceFileName(docHeadline) into documentNameask file "Save Document:" with documentNameput it into documentName-- check if user canceled the operationif documentName is empty thenreturn waisErrorend if-- download thew documentset cursor to busyput GetDocToFile(resultDocNum, docType, documentName, "????", "TEXT")¬into waisErrorif waisError ≠ 0 thenanswer "An error occured while downloading the document."¬with "OK"return waisErrorend ifend downloadTEXT---------------------------------------------------------function downloadJFIF-- prompt the user for a file name and download the picture to that-- file-- wais folderglobal WaisDocumentsFolderglobal WaisSourcesFolder-- document headline information globals ( per document )global docDatabaseNameglobal docSiteNameglobal docSiteIPglobal docScoreglobal docTypeglobal docLinesglobal docLengthglobal docBestMatchglobal docIDglobal docHeadline-- current document text handle and sizeglobal docHdlglobal docHdlSize-- current document number globalglobal resultDocNum-- ask for the file name to save the document intoput niceFileName(docHeadline) & " picture" into documentNameask file "Save JFIF Document:" with documentNameput it into documentName-- check if user canceled the operationif documentName is empty thenreturn waisErrorend if-- append a .bin to the end of the file nameput documentName & ".jfif" into documentNameJFIF-- download thew documentset cursor to busyput GetDocToFile(resultDocNum, docType, documentNameJFIF, "????", "TEXT")¬into waisErrorif waisError ≠ 0 thenanswer "An error occured while downloading the picture."¬with "OK"return waisErrorend if-- convert it from a JFIF file to a pict filejfiftopict documentNameJFIF,File,documentName,trueput the result into waisErrorif waisError is empty thenput 0 into waisErrorend ifif waisError ≠ 0 thenanswer "An error occured while decoding the picture."¬with "OK"put waisError into message boxreturn waisErrorend if-- delete the JFIF fileput HCDelFile(documentNameJFIF) into waisError-- ask the user if he/she wants to see the picture nowanswer "Do you want to look at it now?" with "No" or "Yes"if it = "Yes" then-- display it as a picturepicture documentName,File,zoom,false,0set the itemDelimiter to ":"put the last item of documentName into documentNameset the globalloc of window documentName to deepestset visible of window documentName to trueend ifend downloadJFIF---------------------------------------------------------on mouseWithinballoon "Click on this button to save a document in the "¬& "results list." & return & "To save an document, click on this "¬& "button, then click on the headline in the results list."end mouseWithin---------------------------------------------------------</script>
</part>
<part>
<id>45</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>383</left>
<top>52</top>
<right>625</right>
<bottom>228</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>preview</name>
<script></script>
</part>
<part>
<id>47</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>7</left>
<top>261</top>
<right>630</right>
<bottom>441</bottom>
</rect>
<style>scrolling</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>plain</textStyle>
<textHeight>13</textHeight>
<name>document</name>
<script>on keyDownanswer "You may not modify this text"end keyDownon mouseWithinballoon "This field contains the document section. "end mouseWithin</script>
</part>
<part>
<id>48</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>9</left>
<top>241</top>
<right>98</right>
<bottom>260</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Palatino</font>
<textSize>12</textSize>
<textStyle>outline</textStyle>
<textStyle>bold</textStyle>
<textHeight>16</textHeight>
<name>document_label</name>
<script></script>
</part>
<content>
<layer>card</layer>
<id>23</id>
<text>Query</text>
</content>
<content>
<layer>card</layer>
<id>25</id>
<text>Results</text>
</content>
<content>
<layer>card</layer>
<id>26</id>
<text>Image Browser</text>
</content>
<content>
<layer>card</layer>
<id>48</id>
<text>Document</text>
</content>
<name>query</name>
<script>on initializeCardput empty into card field "query" of card "query"put empty into card field "results" of card "query"put empty into card field "document" of card "query"end initializeCard</script>